<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>
        <span>hello</span>,how are you?
    </p>
    <div>
        <span>1111</span><span>2222</span><span>3333</span>
    </div>
    <script src="./jquery-1.12.4.js"></script>
    <!-- end() 结束当前聊天链条当中最近的筛选操作,并将匹配的元素还原为之前的状态 -->
    <script>
        $(function () {
            // $("p").find("span").end().css("border","2px solid red");

            $("div span").first().css("border","2px solid green").end().last().css("border","2px solid yellow")
        })
    </script>
</body>
</html>